package com.hongyuan.coach.ui.home.beans;

import com.hongyuan.coach.R;
import com.hongyuan.coach.utils.TimeUtil;

import java.io.Serializable;
import java.util.List;

public class HomeContentBean implements Serializable {

    private List<ListBean> list;

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements Serializable{
        /**
         * cpa_id : 24
         * m_id : 3
         * jl_mid : 3
         * cp_id : 180
         * os_id : 18
         * ocp_id : 44
         * num : 1
         * state : 1
         * add_time : 1589855928
         * start_time : 2020-05-19 13:00:00
         * end_time : 2020-05-19 14:00:00
         * xy_qd_time : 0
         * xy_qt_time : 0
         * jl_qd_time : 0
         * jl_qt_time : 0
         * xy_qd_state : 0
         * xy_qt_state : 0
         * jl_qd_state : 0
         * jl_qt_state : 0
         * teacher_m_id : 0
         * admin_id : 0
         * update_time : 0
         * bohui_note :
         * cancel_note :
         * cancel_reason_id : 0
         * is_evaluation : 0
         * cp_img : http://hongyuangood.oss-cn-hangzhou.aliyuncs.com/uplaod/image/20200519/9dbf5eb702487757d83472e480339e9bb1b92994_1024x1866.jpeg
         * cp_name : 测试
         * m_name : 妮妮
         * m_mobile : 18183185173
         * mi_head : http://hongyuangood.oss-cn-hangzhou.aliyuncs.com/uplaod/image/20200414/2e4f6772c99ea949617b0cc3c61b52217596ea71_1920x1008.jpeg
         * add_date : 2020-05-19 10:38:48
         */

        private int cpa_id;
        private int m_id;
        private int jl_mid;
        private int cp_id;
        private int os_id;
        private int ocp_id;
        private int num;
        private int state;
        private int add_time;
        private String start_time;
        private String end_time;
        private int xy_qd_time;
        private int xy_qt_time;
        private int jl_qd_time;
        private int jl_qt_time;
        private int xy_qd_state;
        private int xy_qt_state;
        private int jl_qd_state;
        private int jl_qt_state;
        private int teacher_m_id;
        private int admin_id;
        private int update_time;
        private String bohui_note;
        private String cancel_note;
        private int cancel_reason_id;
        private int is_evaluation;
        private String cp_img;
        private String cp_name;
        private String m_name;
        private String m_mobile;
        private String mi_head;
        private String add_date;
        private String mi_realname;
        private int have_num;

        public int getHave_num() {
            return have_num;
        }

        public void setHave_num(int have_num) {
            this.have_num = have_num;
        }

        public String getMi_realname() {
            return mi_realname;
        }

        public void setMi_realname(String mi_realname) {
            this.mi_realname = mi_realname;
        }

        public int getCpa_id() {
            return cpa_id;
        }

        public void setCpa_id(int cpa_id) {
            this.cpa_id = cpa_id;
        }

        public int getM_id() {
            return m_id;
        }

        public void setM_id(int m_id) {
            this.m_id = m_id;
        }

        public int getJl_mid() {
            return jl_mid;
        }

        public void setJl_mid(int jl_mid) {
            this.jl_mid = jl_mid;
        }

        public int getCp_id() {
            return cp_id;
        }

        public void setCp_id(int cp_id) {
            this.cp_id = cp_id;
        }

        public int getOs_id() {
            return os_id;
        }

        public void setOs_id(int os_id) {
            this.os_id = os_id;
        }

        public int getOcp_id() {
            return ocp_id;
        }

        public void setOcp_id(int ocp_id) {
            this.ocp_id = ocp_id;
        }

        public int getNum() {
            return num;
        }

        public void setNum(int num) {
            this.num = num;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public int getAdd_time() {
            return add_time;
        }

        public void setAdd_time(int add_time) {
            this.add_time = add_time;
        }

        public String getStart_time() {
            return start_time;
        }

        public void setStart_time(String start_time) {
            this.start_time = start_time;
        }

        public String getEnd_time() {
            return end_time;
        }

        public void setEnd_time(String end_time) {
            this.end_time = end_time;
        }

        public int getXy_qd_time() {
            return xy_qd_time;
        }

        public void setXy_qd_time(int xy_qd_time) {
            this.xy_qd_time = xy_qd_time;
        }

        public int getXy_qt_time() {
            return xy_qt_time;
        }

        public void setXy_qt_time(int xy_qt_time) {
            this.xy_qt_time = xy_qt_time;
        }

        public int getJl_qd_time() {
            return jl_qd_time;
        }

        public void setJl_qd_time(int jl_qd_time) {
            this.jl_qd_time = jl_qd_time;
        }

        public int getJl_qt_time() {
            return jl_qt_time;
        }

        public void setJl_qt_time(int jl_qt_time) {
            this.jl_qt_time = jl_qt_time;
        }

        public int getXy_qd_state() {
            return xy_qd_state;
        }

        public void setXy_qd_state(int xy_qd_state) {
            this.xy_qd_state = xy_qd_state;
        }

        public int getXy_qt_state() {
            return xy_qt_state;
        }

        public void setXy_qt_state(int xy_qt_state) {
            this.xy_qt_state = xy_qt_state;
        }

        public int getJl_qd_state() {
            return jl_qd_state;
        }

        public void setJl_qd_state(int jl_qd_state) {
            this.jl_qd_state = jl_qd_state;
        }

        public int getJl_qt_state() {
            return jl_qt_state;
        }

        public void setJl_qt_state(int jl_qt_state) {
            this.jl_qt_state = jl_qt_state;
        }

        public int getTeacher_m_id() {
            return teacher_m_id;
        }

        public void setTeacher_m_id(int teacher_m_id) {
            this.teacher_m_id = teacher_m_id;
        }

        public int getAdmin_id() {
            return admin_id;
        }

        public void setAdmin_id(int admin_id) {
            this.admin_id = admin_id;
        }

        public int getUpdate_time() {
            return update_time;
        }

        public void setUpdate_time(int update_time) {
            this.update_time = update_time;
        }

        public String getBohui_note() {
            return bohui_note;
        }

        public void setBohui_note(String bohui_note) {
            this.bohui_note = bohui_note;
        }

        public String getCancel_note() {
            return cancel_note;
        }

        public void setCancel_note(String cancel_note) {
            this.cancel_note = cancel_note;
        }

        public int getCancel_reason_id() {
            return cancel_reason_id;
        }

        public void setCancel_reason_id(int cancel_reason_id) {
            this.cancel_reason_id = cancel_reason_id;
        }

        public int getIs_evaluation() {
            return is_evaluation;
        }

        public void setIs_evaluation(int is_evaluation) {
            this.is_evaluation = is_evaluation;
        }

        public String getCp_img() {
            return cp_img;
        }

        public void setCp_img(String cp_img) {
            this.cp_img = cp_img;
        }

        public String getCp_name() {
            return cp_name;
        }

        public void setCp_name(String cp_name) {
            this.cp_name = cp_name;
        }

        public String getM_name() {
            return m_name;
        }

        public void setM_name(String m_name) {
            this.m_name = m_name;
        }

        public String getM_mobile() {
            return m_mobile;
        }

        public void setM_mobile(String m_mobile) {
            this.m_mobile = m_mobile;
        }

        public String getMi_head() {
            return mi_head;
        }

        public void setMi_head(String mi_head) {
            this.mi_head = mi_head;
        }

        public String getAdd_date() {
            return add_date;
        }

        public void setAdd_date(String add_date) {
            this.add_date = add_date;
        }



        /*
        * 显示课程数
        * */
        public String getShowCpName(){
            return "预约课程："+cp_name;
        }

        /*
        * 显示课程数
        * */
        public String getShowCpNameNum(){
            return "预约课程："+cp_name+"/剩余"+have_num+"节";
        }


        /*
        * 是否显示 联系学员
        * */
        public boolean isShowTopText(){
            if(state == 1 || state == 5){
                return true;
            }

            return false;
        }

        /*
        * 按钮显示的内容
        * */
        public String botText(){
            if(state == 1){
                return "待学员签到";
            }else if(state == 2){
                return "已取消";
            }else if(state == 3){
                return "已签到";
            }else if(state == 5){
                return "查看";
            }else if(state == 6){
                return "已驳回";
            }
            return "";
        }

        /*
        * 查看按钮样式
        * */
        public int botTextBg(){
            if(state == 5){
                return R.drawable.shape_radius16_3da1e7;
            }else{
                return R.color.transparent;
            }
        }

        /*
        * 查看字体样式
        * */
        public int botTextColor(){
            if(state == 1){
                return R.color.theme_999999;
            }else if(state == 2){
                return R.color.theme_EF5B48;
            }else if(state == 3){
                return R.color.theme_FF0EC05D;
            }else if(state == 5){
                return R.color.theme_FFFFFF;
            }else if(state == 6){
                return R.color.theme_EF5B48;
            }

            return R.color.theme_999999;
        }

        /*
        * 描述字体颜色
        * 状态1待上课 2已取消 3学员签到已完成 5申请取消中 6取消驳回
        * */
        public int stateTextColor(){
            if(state == 1){
                return R.color.theme_3DA1E7;
            }else if(state == 2){
                return R.color.theme_999999;
            }else if(state == 3){
                return R.color.theme_3DA1E7;
            }else if(state == 5){
                return R.color.theme_EF5B48;
            }else if(state == 6){
                return R.color.theme_EF5B48;
            }

            return R.color.theme_999999;
        }

        /*
        * 描述字体颜色
        * 状态1待上课 2已取消 3学员签到已完成 5申请取消中 6取消驳回
        * */
        public String stateTextContent(){
            if(state == 1){
                return "上课时间："+TimeUtil.formatDate(start_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM) + "-" +
                        TimeUtil.formatDate(end_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM);
            }else if(state == 2){
                return "上课时间："+TimeUtil.formatDate(start_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM) + "-" +
                        TimeUtil.formatDate(end_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM);
            }else if(state == 3){
                return "上课时间："+TimeUtil.formatDate(start_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM) + "-" +
                        TimeUtil.formatDate(end_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM);
            }else if(state == 5){
                return "取消预约中";
            }else if(state == 6){
                return "已驳回申请取消预约";
            }

            return "";
        }

        /*
        * 上课时间
        * */
        public String showTime(){

            return TimeUtil.formatDate(start_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM) + "-" +
                    TimeUtil.formatDate(end_time,TimeUtil.dateFormatYMDHMS,TimeUtil.dateFormatHM);
        }
    }
}
